
local locplayer = ac.player.self
--点击进化按钮
local button = class.button.create([[ReplaceableTextures\CommandButtons\BTNSkillz.blp]],(1920-64)/2,750,64,64,1)
button._effect = button:child_builder {
    parent = button,
    type = 'model',
    model = [[UI\Feedback\Autocast\UI-ModalButtonOn.mdl]],
    x = 4,
    y = 2,
    scales = {button.w / 94,button.h / 70},
}
button:add_text('|cffffff00点击进化|r',(button.w-200)/2,button.h,200,35,12,5)
button:hide()

function button:on_button_clicked()
    ac.sync('玩家-准备更换英雄')
end

ac.hardware:event '界面绘制'(function()
    if locplayer:get_data('能进化') then
        button:show()
    else
        button:hide()
    end
end)
